<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/10/19/0019
 * Time: 16:39
 */

namespace App\Service;

use App\Models\Good;
use Illuminate\Support\Facades\DB;

class GoodService
{
    public static function goods_sn(){
        $yCode = array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J');
        $goods_sn = $yCode[intval(date('Y')) - 2011] . strtoupper(dechex(date('m'))) . date('d') . substr(time(), -5) . substr(microtime(), 2, 5) . sprintf('%02d', rand(0, 99));
        return $goods_sn;
    }
}